/**
 * @project heima-leadnews
 * @author MECHREVO
 * @date 2024/1/20 11:41:06
 * @version 1.0
 */
package com.heima.wemedia.config;

import net.sourceforge.tess4j.Tesseract;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class TesseractConfig {
    @Bean
    public Tesseract tesseract(Test4jProperties  test4jProperties){
        Tesseract tesseract=new Tesseract();
        //设置字体路径
        tesseract.setDatapath(test4jProperties.getDatapath());
        //中文识别
        tesseract.setLanguage(test4jProperties.getLanguage());
        return tesseract;
    }
}
